Runtime Monitoring of Object Invariants with Guarantee

نویسندگان

  • Madhu Gopinathan
  • Sriram K. Rajamani
چکیده

High level design decisions are never captured formally in programs and are often violated as programs evolve. In this paper, we focus on design decisions in which an object o works correctly only if another object p is in some specific states. Such decisions can be specified as the object invariant of o. The invariant of o must hold when control is not inside any of o’s methods (i.e. when o is in a steady state). From discussion forums on widely used APIs, it is clear that there are many instances where o’s invariant is violated by the programmer inadvertently changing the state of p when o is in a steady state. Typically, o and p are objects exposed by the API, and the programmer (who is the user of the API), unaware of the dependency between o and p, calls a method of p in such a way that o’s invariant is violated. The fact that the violation occurred is detected much later, when a method of o is called again, and it is difficult to determine exactly where such violations occur. We propose a runtime verification scheme which guarantees that when o is in a steady state, any violation of o’s invariant is detected exactly where it occurs. This is done by tracking dependencies automatically and validating whether a state change of an object p breaks the invariant of any object o that depends on p. We demonstrate that our tool InvCOP, which implements this scheme, can accurately pinpoint violations of invariants involving multiple objects that were reported in discussion forums on widely used APIs.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

On the Validation of Invariants at Runtime

The paradigm of contractual specification provides a transparent way of specifying object-oriented systems. In this paradigm, system consistency is specified using so-called invariants. Runtime validation of invariants is a complex problem. Existing validation methods require either exhausting validation of an invariant for all objects of the corresponding class or the use of restrictive type s...

متن کامل

Verification of Multithreaded Object-Oriented Programs with Invariants

Developing safe multithreaded software systems is difficult due to the potential unwanted interference among concurrent threads. This paper presents a sound, modular, and simple verification technique for multithreaded object-oriented programs with object invariants. Based on a recent methodology for object invariants in single-threaded programs, this new verification technique enables leak-pro...

متن کامل

Incremental Evaluation of OCL Invariants in the Essential MOF Object Model

The management of metamodels is supported by runtime environments that enforce the well-formedness of (meta-)model instances. Beyond this basic functionality, additional capabilities are needed in order to successfully establish a toolchain for Model-Driven Software Engineering. We focus on two such capabilities: transactions and efficient evaluation of invariants, not in the usual context of d...

متن کامل

SAVCBS 2004 Specification and Verification of Component-Based Systems

Developing safe multithreaded software systems is difficult due to the potential unwanted interference among concurrent threads. This paper presents a sound, modular, and simple verification technique for multithreaded object-oriented programs with object invariants. Based on a recent methodology for object invariants in single-threaded programs, this new verification technique enables leak-pro...

متن کامل

Clousot: Static Contract Checking with Abstract Interpretation

We present an overview of Clousot, our current tool to statically check CodeContracts. CodeContracts enable a compiler and languageindependent specification of Contracts (precondition, postconditions and object invariants). Clousot checks every method in isolation using an assume/guarantee reasoning: For each method under analysis Clousot assumes its precondition and asserts the postcondition. ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008